using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.Practices.EnterpriseLibrary.Validation;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace EntLibContrib.Validation.Validators
{
    public class EnumDefinedValidatorAttribute : ValueValidatorAttribute
    {
		/// <summary>
		/// Creates the <see cref="EnumDefinedValidator"/> described by the attribute object.
		/// </summary>
		/// <param name="targetType">The type of object that will be validated by the validator.</param>
		/// <remarks>This operation must be overriden by subclasses.</remarks>
		/// <returns>The created <see cref="EnumDefinedValidator"/>.</returns>
		protected override Validator DoCreateValidator(Type targetType)
		{
			return new EnumDefinedValidator(Negated);
		}

    }
}
